package com.ka.component;

import android.widget.EditText;

public class PasswordCompareValidation extends IFieldValidation {

	private String pass;
	private String pass_confirm;

	public PasswordCompareValidation(EditText password, EditText passwordConfirm) {
		
		pass = password.getText().toString().trim();
		pass_confirm = passwordConfirm.getText().toString().trim();
		require = false;
		
	}

	@Override
	public MessageValidate validate() {

		MessageValidate message = new MessageValidate();

		if (!pass.equals(pass_confirm)) {
			message.addErrorMessage("Password none match!");
		}

		return message;
		
	}
}
